package com.nulldev.util.networking.async2.executors;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class ASync2ThreadPool extends ThreadPoolExecutor {

	@SuppressWarnings(
		{ "rawtypes", "unchecked" })
	public ASync2ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) {
		super(corePoolSize, maximumPoolSize, keepAliveTime, unit, new ArrayBlockingQueue(500000, true));
		this.prestartAllCoreThreads();
	}

	public ASync2ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, final BlockingQueue<Runnable> queue) {
		super(corePoolSize, maximumPoolSize, keepAliveTime, unit, queue);
		this.prestartAllCoreThreads();
	}
}
